<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<title>Artisan 命令行 | Laravel 5.1 中文文档
</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="author" content="Taylor Otwell">
	<meta name="description" content="Artisan 命令行,介绍,编写命令,命令结构,命令的输入与输出,定义预期的输入,获取输入,为输入加上提示,编写输出,注册命令,使用代码来调用命令,介绍,Artisan 是 Laravel 的命令行接口的名称，它提供了许多实用的命令来...
">
	<meta name="keywords" content="laravel,laravel中国,laravel中文,laravel框架中文,laravel文档,laravel框架中国,laravel中文文档">
	<meta name="viewport" content="width=device-width, initial-scale=1">
			<link rel="canonical" href="../5.4/artisan.html" />
		<!--[if lte IE 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<link rel="stylesheet" href="../../build/assets/css/laravel-3d54d47ea3.css">
	<link rel="apple-touch-icon" href="../../favicon.png.jpeg">
</head>
<body class="docs language-php">

	<span class="overlay"></span>

	<nav class="main">
		<a href="../../index.html" class="brand nav-block">
			<svg version="1.1"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
	 x="0px" y="0px" width="84.1px" height="57.6px" viewBox="0 0 84.1 57.6" enable-background="new 0 0 84.1 57.6"
	 xml:space="preserve">
<defs>
</defs>
<path fill="#FB503B" d="M83.8,26.9c-0.6-0.6-8.3-10.3-9.6-11.9c-1.4-1.6-2-1.3-2.9-1.2s-10.6,1.8-11.7,1.9c-1.1,0.2-1.8,0.6-1.1,1.6
	c0.6,0.9,7,9.9,8.4,12l-25.5,6.1L21.2,1.5c-0.8-1.2-1-1.6-2.8-1.5C16.6,0.1,2.5,1.3,1.5,1.3c-1,0.1-2.1,0.5-1.1,2.9
	c1,2.4,17,36.8,17.4,37.8c0.4,1,1.6,2.6,4.3,2c2.8-0.7,12.4-3.2,17.7-4.6c2.8,5,8.4,15.2,9.5,16.7c1.4,2,2.4,1.6,4.5,1
	c1.7-0.5,26.2-9.3,27.3-9.8c1.1-0.5,1.8-0.8,1-1.9c-0.6-0.8-7-9.5-10.4-14c2.3-0.6,10.6-2.8,11.5-3.1C84.2,28,84.4,27.5,83.8,26.9z
	 M37.5,36.4c-0.3,0.1-14.6,3.5-15.3,3.7c-0.8,0.2-0.8,0.1-0.8-0.2C21.2,39.6,4.4,4.8,4.1,4.4c-0.2-0.4-0.2-0.8,0-0.8
	c0.2,0,13.5-1.2,13.9-1.2c0.5,0,0.4,0.1,0.6,0.4c0,0,18.7,32.3,19,32.8C38,36.1,37.8,36.3,37.5,36.4z M77.7,43.9
	c0.2,0.4,0.5,0.6-0.3,0.8c-0.7,0.3-24.1,8.2-24.6,8.4c-0.5,0.2-0.8,0.3-1.4-0.6s-8.2-14-8.2-14L68.1,32c0.6-0.2,0.8-0.3,1.2,0.3
	C69.7,33,77.5,43.6,77.7,43.9z M79.3,26.3c-0.6,0.1-9.7,2.4-9.7,2.4l-7.5-10.2c-0.2-0.3-0.4-0.6,0.1-0.7c0.5-0.1,9-1.6,9.4-1.7
	c0.4-0.1,0.7-0.2,1.2,0.5c0.5,0.6,6.9,8.8,7.2,9.1C80.3,26,79.9,26.2,79.3,26.3z"/>
</svg>

			<span>Laravel</span>
		</a>

        <div class="search nav-block">
            <svg version="1.1"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
	 x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<defs>
</defs>
<g>
	<g>
		<path fill="#A1A1A1" d="M5.8,11.7c-1.6,0-3-0.6-4.1-1.7S0,7.4,0,5.8s0.6-3,1.7-4.1C2.8,0.6,4.3,0,5.8,0s3,0.6,4.1,1.7
			c2.3,2.3,2.3,6,0,8.3C8.9,11.1,7.4,11.7,5.8,11.7z M5.8,1C4.5,1,3.3,1.5,2.4,2.4C1.5,3.3,1,4.5,1,5.8s0.5,2.5,1.4,3.4
			c0.9,0.9,2.1,1.4,3.4,1.4s2.5-0.5,3.4-1.4c1.9-1.9,1.9-5,0-6.9C8.4,1.5,7.1,1,5.8,1z"/>
	</g>
	<g>
		<path fill="#A1A1A1" d="M15.5,16c-0.1,0-0.3,0-0.3-0.1L9.3,10c-0.2-0.2-0.2-0.5,0-0.7s0.5-0.2,0.7,0l5.9,5.9
			c0.2,0.2,0.2,0.5,0,0.7C15.8,16,15.6,16,15.5,16z"/>
	</g>
</g>
</svg>

            <input placeholder="搜索文档" type="text" v-model="search" id="search-input" v-on:blur="reset" />
        </div>

		<ul class="main-nav" v-if="! search">
			<li class="nav-docs"><a href="../5.4.html">文档</a></li>
<li ><a href="https://news.laravel-china.org/" class="no-pjax">Laravel 资讯</a></li>
<li class="dropdown"><a href="https://laravel-china.org/">Laravel China 社区</a></li>
<li class="nav-forge"><a href="https://laravel-china.org/categories/1">酷工作</a></li>
<li class="nav-docs"><a href="http://lumen.laravel-china.org">Lumen</a></li>
<li class="nav-forge"><a href="https://cs.laravel-china.org/">速查表</a></li>
<li class="nav-forge"><a href="https://laravel-china.org/laravel-tutorial/5.1/about">《Laravel 入门教程》</a></li>
		</ul>

        			<div class="switcher">
	<div class="dropdown">
		<button class="btn dropdown-toggle btn-inverted" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
			<!--<span class="faint">v</span> -->
			5.1
			<span class="caret"></span>
		</button>
		<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
							<li role="presentation">
					<a role="menuitem" tabindex="-1" href="../5.4/artisan.html">5.4</a>
				</li>
							<li role="presentation">
					<a role="menuitem" tabindex="-1" href="../5.3/artisan.html">5.3</a>
				</li>
							<li role="presentation">
					<a role="menuitem" tabindex="-1" href="../5.2/artisan.html">5.2</a>
				</li>
							<li role="presentation">
					<a role="menuitem" tabindex="-1" href="artisan.html">5.1</a>
				</li>
					</ul>
	</div>
</div>
		
        <div class="responsive-sidebar-nav">
			<a href="artisan.html#" class="toggle-slide menu-link btn">&#9776;</a>
		</div>
	</nav>

	<nav id="slide-menu" class="slide-menu" role="navigation">

	<div class="brand">
		<a href="../../index.html">
			<img src="../../assets/img/laravel-logo-white.png" height="50">
		</a>
	</div>

	<ul class="slide-main-nav">
		<li><a href="../../index.html">Home</a></li>
		<li class="nav-docs"><a href="../5.4.html">文档</a></li>
<li ><a href="https://news.laravel-china.org/" class="no-pjax">Laravel 资讯</a></li>
<li class="dropdown"><a href="https://laravel-china.org/">Laravel China 社区</a></li>
<li class="nav-forge"><a href="https://laravel-china.org/categories/1">酷工作</a></li>
<li class="nav-docs"><a href="http://lumen.laravel-china.org">Lumen</a></li>
<li class="nav-forge"><a href="https://cs.laravel-china.org/">速查表</a></li>
<li class="nav-forge"><a href="https://laravel-china.org/laravel-tutorial/5.1/about">《Laravel 入门教程》</a></li>
	</ul>

	<div class="slide-docs-nav">
		<h2>Documentation</h2>
		<ul>
<li>前言
<ul>
<li><a href="about.html">翻译说明</a></li>
<li><a href="releases.html">发行说明</a></li>
<li><a href="upgrade.html">升级导引</a></li>
<li><a href="contributions.html">贡献导引</a></li>
<li><a href="http://laravel-china.org/api/5.1">API 文档</a></li>
</ul></li>
<li>环境配置
<ul>
<li><a href="installation.html">安装</a></li>
<li><a href="homestead.html">Homestead</a></li>
</ul></li>
<li>基本功能
<ul>
<li><a href="routing.html">路由</a></li>
<li><a href="middleware.html">中间件</a></li>
<li><a href="controllers.html">控制器</a></li>
<li><a href="requests.html">请求</a></li>
<li><a href="responses.html">响应</a></li>
<li><a href="views.html">视图</a></li>
<li><a href="blade.html">Blade 模板</a></li>
</ul></li>
<li>教程
<ul>
<li><a href="quickstart.html">初级任务清单</a></li>
<li><a href="quickstart-intermediate.html">中级任务清单</a></li>
</ul></li>
<li>系统架构
<ul>
<li><a href="lifecycle.html">请求生命周期</a></li>
<li><a href="structure.html">应用程序结构</a></li>
<li><a href="providers.html">服务提供者</a></li>
<li><a href="container.html">服务容器</a></li>
<li><a href="contracts.html">Contracts</a></li>
<li><a href="facades.html">Facades</a></li>
</ul></li>
<li>系统服务
<ul>
<li><a href="authentication.html">用户认证</a></li>
<li><a href="authorization.html">用户授权</a></li>
<li><a href="artisan.html">Artisan 命令行</a></li>
<li><a href="billing.html">交易</a></li>
<li><a href="cache.html">缓存</a></li>
<li><a href="collections.html">集合</a></li>
<li><a href="elixir.html">Elixir</a></li>
<li><a href="encryption.html">加密与解密</a></li>
<li><a href="errors.html">错误与日志</a></li>
<li><a href="events.html">事件</a></li>
<li><a href="filesystem.html">文件系统与云存储</a></li>
<li><a href="hashing.html">哈希</a></li>
<li><a href="helpers.html">辅助函数</a></li>
<li><a href="localization.html">本地化</a></li>
<li><a href="mail.html">邮件</a></li>
<li><a href="packages.html">扩展包开发</a></li>
<li><a href="pagination.html">分页</a></li>
<li><a href="queues.html">队列</a></li>
<li><a href="redis.html">Redis</a></li>
<li><a href="session.html">Session</a></li>
<li><a href="envoy.html">Envoy</a></li>
<li><a href="scheduling.html">任务调度</a></li>
<li><a href="testing.html">测试</a></li>
<li><a href="validation.html">表单验证</a></li>
</ul></li>
<li>数据库
<ul>
<li><a href="database.html">入门</a></li>
<li><a href="queries.html">查询构造器</a></li>
<li><a href="migrations.html">数据库迁移</a></li>
<li><a href="seeding.html">数据填充</a></li>
</ul></li>
<li>Eloquent ORM
<ul>
<li><a href="eloquent.html">入门</a></li>
<li><a href="eloquent-relationships.html">模型关联</a></li>
<li><a href="eloquent-collections.html">Eloquent 集合</a></li>
<li><a href="eloquent-mutators.html">Getter/Setter</a></li>
<li><a href="eloquent-serialization.html">序列化</a></li>
</ul></li>
</ul>
	</div>

</nav>

<div class="docs-wrapper container">

	<section class="sidebar">

            <div class="header">
              <a type="button" class="btn btn-primary btn-inverted btn-lg btn-block turnofflight"><i class="fa fa-lightbulb-o"></i> 夜间模式 </a>
              <br>
              <div class="versions text-center ">
                <a class="doc-btn btn-inverted " href="../5.4.html" title="Laravel 5.4 中文文档">C5.4</a>
                <a class="doc-btn btn-inverted " href="../5.3.html" title="Laravel 5.3 中文文档">C5.3</a>
                <a class="doc-btn btn-inverted active" href="../5.1.html" title="Laravel 5.1 中文文档">C5.1</a>
              </div>
            </div>

            <a href="https://laravel-china.org/topics/3383" target="_blank" rel="nofollow" title="" style="display: block;margin-bottom: 23px;">
                <img src="https://dn-phphub.qbox.me/uploads/images/201612/10/1/k7wwMpJduq.jpg" style="width: 100%;border: 1px solid #d8d3d3;box-shadow: 0 0 30px #d4d4d4;-moz-box-shadow: 0 0 30px #ccc;-webkit-box-shadow: 0 0 30px #d4d4d4;margin-bottom: 30px;margin-top: 10px;border-radius: 4px;">
            </a>

		<ul>
<li>前言
<ul>
<li><a href="about.html">翻译说明</a></li>
<li><a href="releases.html">发行说明</a></li>
<li><a href="upgrade.html">升级导引</a></li>
<li><a href="contributions.html">贡献导引</a></li>
<li><a href="http://laravel-china.org/api/5.1">API 文档</a></li>
</ul></li>
<li>环境配置
<ul>
<li><a href="installation.html">安装</a></li>
<li><a href="homestead.html">Homestead</a></li>
</ul></li>
<li>基本功能
<ul>
<li><a href="routing.html">路由</a></li>
<li><a href="middleware.html">中间件</a></li>
<li><a href="controllers.html">控制器</a></li>
<li><a href="requests.html">请求</a></li>
<li><a href="responses.html">响应</a></li>
<li><a href="views.html">视图</a></li>
<li><a href="blade.html">Blade 模板</a></li>
</ul></li>
<li>教程
<ul>
<li><a href="quickstart.html">初级任务清单</a></li>
<li><a href="quickstart-intermediate.html">中级任务清单</a></li>
</ul></li>
<li>系统架构
<ul>
<li><a href="lifecycle.html">请求生命周期</a></li>
<li><a href="structure.html">应用程序结构</a></li>
<li><a href="providers.html">服务提供者</a></li>
<li><a href="container.html">服务容器</a></li>
<li><a href="contracts.html">Contracts</a></li>
<li><a href="facades.html">Facades</a></li>
</ul></li>
<li>系统服务
<ul>
<li><a href="authentication.html">用户认证</a></li>
<li><a href="authorization.html">用户授权</a></li>
<li><a href="artisan.html">Artisan 命令行</a></li>
<li><a href="billing.html">交易</a></li>
<li><a href="cache.html">缓存</a></li>
<li><a href="collections.html">集合</a></li>
<li><a href="elixir.html">Elixir</a></li>
<li><a href="encryption.html">加密与解密</a></li>
<li><a href="errors.html">错误与日志</a></li>
<li><a href="events.html">事件</a></li>
<li><a href="filesystem.html">文件系统与云存储</a></li>
<li><a href="hashing.html">哈希</a></li>
<li><a href="helpers.html">辅助函数</a></li>
<li><a href="localization.html">本地化</a></li>
<li><a href="mail.html">邮件</a></li>
<li><a href="packages.html">扩展包开发</a></li>
<li><a href="pagination.html">分页</a></li>
<li><a href="queues.html">队列</a></li>
<li><a href="redis.html">Redis</a></li>
<li><a href="session.html">Session</a></li>
<li><a href="envoy.html">Envoy</a></li>
<li><a href="scheduling.html">任务调度</a></li>
<li><a href="testing.html">测试</a></li>
<li><a href="validation.html">表单验证</a></li>
</ul></li>
<li>数据库
<ul>
<li><a href="database.html">入门</a></li>
<li><a href="queries.html">查询构造器</a></li>
<li><a href="migrations.html">数据库迁移</a></li>
<li><a href="seeding.html">数据填充</a></li>
</ul></li>
<li>Eloquent ORM
<ul>
<li><a href="eloquent.html">入门</a></li>
<li><a href="eloquent-relationships.html">模型关联</a></li>
<li><a href="eloquent-collections.html">Eloquent 集合</a></li>
<li><a href="eloquent-mutators.html">Getter/Setter</a></li>
<li><a href="eloquent-serialization.html">序列化</a></li>
</ul></li>
</ul>

		<hr>
            <ul>
              <li>社交账号
                <ul>
                  <li><a href="http://weibo.com/laravelnews">微博：「Laravel资讯」</a></li>
                  <li>
                    新手 QQ 群：483184286
                  </li>
                  <li>
                    <br>
                    订阅 Laravel 资讯
<img class="image-border popover-with-html" data-content="" src="https://dn-phphub.qbox.me/uploads/images/201609/19/1/pVYzokV0Od.jpg" style="width: 148px;height: 148px;border:1px solid #ccc;padding:2px;border-radius:3px;margin-top:5px;" data-original-title="" title="">
                  </li>

                </ul>
              </li>
            </ul>

	</section>

	

	<article>

		<div class="alert alert-warning" role="alert">
			一小时同步一次，更多信息请查阅 <a href="https://laravel-china.org/topics/2095">文档导读</a>。
			发现瑕疵？你也可以
				<a href="https://github.com/laravel-china/laravel-docs/edit/5.1/artisan.md"><i class="fa fa-pencil-square-o"></i> 改进本文</a>
			。
		</div>

		<div class="main-content">
			<h1>Artisan 命令行</h1>
<ul>
<li><a href="artisan.html#introduction">介绍</a></li>
<li><a href="artisan.html#writing-commands">编写命令</a>
<ul>
<li><a href="artisan.html#command-structure">命令结构</a></li>
</ul></li>
<li><a href="artisan.html#command-io">命令的输入与输出</a>
<ul>
<li><a href="artisan.html#defining-input-expectations">定义预期的输入</a></li>
<li><a href="artisan.html#retrieving-input">获取输入</a></li>
<li><a href="artisan.html#prompting-for-input">为输入加上提示</a></li>
<li><a href="artisan.html#writing-output">编写输出</a></li>
</ul></li>
<li><a href="artisan.html#registering-commands">注册命令</a></li>
<li><a href="artisan.html#calling-commands-via-code">使用代码来调用命令</a></li>
</ul>
<p><a name="introduction"></a></p>
<h2>介绍</h2>
<p>Artisan 是 Laravel 的命令行接口的名称，它提供了许多实用的命令来帮助你开发 Laravel 应用，它由强大的 Symfony Console 组件所驱动。</p>
<p>可以使用 <code>list</code> 命令来列出所有可用的 Artisan 命令：</p>
<pre><code>php artisan list</code></pre>
<p>每个命令也包含了「帮助」界面，它会显示并概述命令可使的参数及选项。只要在命令前面加上 <code>help</code> 即可显示帮助界面：</p>
<pre><code>php artisan help migrate</code></pre>
<p><a name="writing-commands"></a></p>
<h2>编写命令</h2>
<p>除了使用 Artisan 本身所提供的命令之外，Laravel 也允许你自定义 Artisan 命令。</p>
<p>自定义命令默认存储在 <code>app/Console/Commands</code> 目录中，当然，只要在 <code>composer.json</code> 文件中的配置了自动加载，你可以自由选择想要放置的地方。</p>
<p>若要创建新的命令，你可以使用 <code>make:console</code> Artisan 命令生成命令文件：</p>
<pre><code>php artisan make:console SendEmails</code></pre>
<p>上面的这个命令会生成 <code>app/Console/Commands/SendEmails.php</code> 类，<code>--command</code> 参数可以用来指定调用名称：</p>
<pre><code>php artisan make:console SendEmails --command=emails:send</code></pre>
<p><a name="command-structure"></a></p>
<h3>命令结构</h3>
<p>一旦生成这个命令，应先填写类的 <code>signature</code> 和 <code>description</code> 这两个属性，它们会被显示在 <code>list</code> 界面中。</p>
<p>命令运行时 <code>handle</code> 方法会被调用，请将程序逻辑放置在此方法中。</p>
<p>接下来讲解一个发送邮件的例子。</p>
<p>为了更好的代码重用性，还有可读性，建议把处理业务逻辑的代码抽到一个功能类里。</p>
<p>Command 类构造器允许注入需要的依赖，Laravel 的 <a href="container.html">服务容器</a> 将会自动把功能类 DripEmailer 解析到构造器中：</p>
<pre><code>&lt;?php

namespace App\Console\Commands;

use App\User;
use App\DripEmailer;
use Illuminate\Console\Command;

class SendEmails extends Command
{
    /**
     * 命令行的名称及用法。
     *
     * @var string
     */
    protected $signature = 'email:send {user}';

    /**
     * 命令行的概述。
     *
     * @var string
     */
    protected $description = 'Send drip e-mails to a user';

    /**
     * 滴灌电子邮件服务。
     *
     * @var DripEmailer
     */
    protected $drip;

    /**
     * 创建新的命令实例。
     *
     * @param  DripEmailer  $drip
     * @return void
     */
    public function __construct(DripEmailer $drip)
    {
        parent::__construct();

        $this-&gt;drip = $drip;
    }

    /**
     * 运行命令。
     *
     * @return mixed
     */
    public function handle()
    {
        $this-&gt;drip-&gt;send(User::find($this-&gt;argument('user')));
    }
}</code></pre>
<p><a name="command-io"></a></p>
<h2>命令的输入与输出</h2>
<p><a name="defining-input-expectations"></a></p>
<h3>定义预期的输入</h3>
<p><code>signature</code> 属性定义了希望从用户获得的输入格式，<code>signature</code> 属性可用来定义命令的名字、参数及选项，具有与路由相似的语法特性。</p>
<p>参数及选项都包在大括号中。如以下例子，此命令会定义一个 <strong>必须的</strong> 参数 <code>user</code>：</p>
<pre><code>/**
 * 命令行的名称及用法。
 *
 * @var string
 */
protected $signature = 'email:send {user}';</code></pre>
<p>以下是可选参数和默认值的例子（注意括号内的符号）：</p>
<pre><code>// 选择性的参数...
email:send {user?}

// 选择性的参数及默认的值...
email:send {user=foo}</code></pre>
<p>选项就跟参数一样，同样也是用户输入的一种格式，不过当使用选项时，需要在命令行加入两个连字符号（<code>--</code>），选项的定义如下：</p>
<pre><code>/**
 * 命令行的名称及用法。
 *
 * @var string
 */
protected $signature = 'email:send {user} {--queue}';</code></pre>
<p>在这个例子中，当调用 Artisan 命令时，<code>--queue</code> 这个选项可以被明确的指定。如果 <code>--queue</code> 被当成输入时，这个选项的值会是 <code>true</code>，如果没有指定时，这个选项的值将会是 <code>false</code>：</p>
<pre><code>php artisan email:send 1 --queue</code></pre>
<p>你也可以借助在这个选项后面加个 <code>=</code> 来为选项明确指定值：</p>
<pre><code>/**
 * 命令行的名称及用法。
 *
 * @var string
 */
protected $signature = 'email:send {user} {--queue=}';</code></pre>
<p>在这个例子中，用户可以为这个参数传入一个值：</p>
<pre><code>php artisan email:send 1 --queue=default</code></pre>
<p>指定默认值给选项：</p>
<pre><code>email:send {user} {--queue=default}</code></pre>
<p>为选项定义简写方式：</p>
<pre><code>email:send {user} {--Q|queue}</code></pre>
<h4>增加概述</h4>
<p>使用冒号 <code>:</code> 可以为参数和选项增加概述：</p>
<pre><code>/**
 * 命令行的名称及用法。
 *
 * @var string
 */
protected $signature = 'email:send
                        {user : 用户的 ID }
                        {--queue= : 这个工作是否该进入队列}';</code></pre>
<p><a name="retrieving-input"></a></p>
<h3>获取输入</h3>
<p>代码里通过调用 <code>argument</code> 及 <code>option</code> 方法来获取对应的参数和选项输入。</p>
<p>使用 <code>argument</code> 方法来获取参数的值：</p>
<pre><code>/**
 * 命令行的处理逻辑
 *
 * @return mixed
 */
public function handle()
{
    $userId = $this-&gt;argument('user');

    //
}</code></pre>
<p>不加参数调用，可以获取到所有的参数 <code>数组</code>：</p>
<pre><code>$arguments = $this-&gt;argument();</code></pre>
<p><code>option</code> 方法的使用同 <code>argument</code> 一样：</p>
<pre><code>// 获取特定的选择
$queueName = $this-&gt;option('queue');

// 获取所有选择
$options = $this-&gt;option();</code></pre>
<p>如果参数或选项不存在，将会返回 <code>null</code>。</p>
<p><a name="prompting-for-input"></a></p>
<h3>让用户回答</h3>
<p><code>ask</code> 方法提供的问题来提示用户，并且接受他们的输入，返回的是用户输入：</p>
<pre><code>/**
 * 命令行的处理逻辑
 *
 * @return mixed
 */
public function handle()
{
    $name = $this-&gt;ask('你是名字是?');
}</code></pre>
<p><code>secret</code> 如同 <code>ask</code> 方法一般，但是用户的输入将不会显示在命令行。这个方法适用于要求提供如密码的敏感信息时：</p>
<pre><code>$password = $this-&gt;secret('密码是？');</code></pre>
<h4>让用户确认</h4>
<p><code>confirm</code> 方法提供询问用户确认，默认的情况下，这个方法会返回 <code>false</code>。如果用户对这个提示输入 <code>y</code>，那这个方法将会返回 <code>true</code>：</p>
<pre><code>if ($this-&gt;confirm('你希望继续吗? [y|N]')) {
    //
}</code></pre>
<h4>让用户做选择</h4>
<p><code>anticipate</code> 方法可被用于为可能的选择提供自动完成。用户仍可以选择任何答案而不理会这些选择。</p>
<pre><code>$name = $this-&gt;anticipate('你的名字是?', ['Taylor', 'Dayle']);</code></pre>
<p><code>choice</code> 方法让用户从给定选项里选择，用户会选择答案的索引，但是返回的是答案的值。可以设置返回默认值来防止没有任何东西被选择的情况：</p>
<pre><code>$name = $this-&gt;choice('你的名字是?', ['Taylor', 'Dayle'], false);</code></pre>
<p><a name="writing-output"></a></p>
<h3>编写输出</h3>
<p>使用 <code>line</code>、<code>info</code>、<code>comment</code>、<code>question</code> 和 <code>error</code> 方法来发送输出到终端。每个方法都有适当的 ANSI 颜色来表达它们的目的。</p>
<p>使用 <code>info</code> 方法来发送信息消息给用户，并在终端以绿色呈现：</p>
<pre><code>/**
 * 命令行的处理逻辑
 *
 * @return mixed
 */
public function handle()
{
    $this-&gt;info('把我显示在界面上');
}</code></pre>
<p>使用 <code>error</code> 方法来发送错误消息给用户，并在终端以红色呈现：</p>
<pre><code>$this-&gt;error('有东西出问题了！');</code></pre>
<p><code>line</code> 方法不会输出任何特殊的颜色：</p>
<pre><code>$this-&gt;line('把我显示在界面上');</code></pre>
<h4>数据表布局</h4>
<p>使用 <code>table</code> 方法格式化输出多行与多列数据，宽跟高将会基于数据做动态计算:</p>
<pre><code>$headers = ['Name', 'Email'];

$users = App\User::all(['name', 'email'])-&gt;toArray();

$this-&gt;table($headers, $users);</code></pre>
<h4>进度条</h4>
<p>对于需要长时间运行的任务，可以使用进度条来提示用户：</p>
<pre><code>$users = App\User::all();

// 多少个任务
$bar = $this-&gt;output-&gt;createProgressBar(count($users));

foreach ($users as $user) {
    $this-&gt;performTask($user);

    // 一个任务处理完了，可以前进一点点了
    $bar-&gt;advance();
}

$bar-&gt;finish();</code></pre>
<p>更多信息请查阅 <a href="http://symfony.com/doc/2.7/components/console/helpers/progressbar.html">Symfony Progress Bar 组件的文档</a>。</p>
<p><a name="registering-commands"></a></p>
<h2>注册命令</h2>
<p>命令编写完成后，需要注册 Artisan 后才能使用。注册文件为 <code>app/Console/Kernel.php</code>。</p>
<p>在这个文件中，<code>commands</code> 属性是命令的清单，要注册命令，请在此清单加入类的名称即可。</p>
<p>当 Artisan 启动时，所有罗列在这个
属性的命令，都会被 <a href="container.html">服务容器</a> 解析并向 Artisan 注册：</p>
<pre><code>protected $commands = [
    Commands\SendEmails::class,
];</code></pre>
<p><a name="calling-commands-via-code"></a></p>
<h2>程序内部调用命令</h2>
<p>利用 <code>Artisan</code> facade 的 <code>call</code> 方法，可以在程序内部调用 Artisan 命令。</p>
<p><code>call</code> 方法的第一个参数为命令的名称，第二个参数为数组型态的命令输入，退出码将会被返回：</p>
<pre><code>Route::get('/foo', function () {
    $exitCode = Artisan::call('email:send', [
        'user' =&gt; 1,
        '--queue' =&gt; 'default'
    ]);

    //
});</code></pre>
<p>在 <code>Artisan</code> facade 使用 <code>queue</code> 方法，可以将 Artisan 命令丢给后台的 <a href="queues.html">队列服务器</a> 运行：</p>
<pre><code>Route::get('/foo', function () {
    Artisan::queue('email:send', [
        'user' =&gt; 1,
        '--queue' =&gt; 'default'
    ]);

    //
});</code></pre>
<p>如果需要指定非接收字符串选项的值，如 <code>migrate:refresh</code> 命令的 <code>--force</code> 标记，你可以传递一个 <code>true</code> 或 <code>false</code> 的布尔值：</p>
<pre><code>$exitCode = Artisan::call('migrate:refresh', [
    '--force' =&gt; true,
]);</code></pre>
<h3>命令中调用其它命令</h3>
<p>Command 类的 <code>call</code> 方法可以让你在命令中调用命令，<code>call</code> 方法接受命令名称和命令参数的数组：</p>
<pre><code>/**
 * 命令行的处理逻辑
 *
 * @return mixed
 */
public function handle()
{
    $this-&gt;call('email:send', [
        'user' =&gt; 1,
        '--queue' =&gt; 'default'
    ]);

    //
}</code></pre>
<p>调用其它命令并忽略它所有的输出，可以使用 <code>callSilent</code> 命令。<code>callSilent</code> 方法有和 <code>call</code> 方法一样的用法：</p>
<pre><code>$this-&gt;callSilent('email:send', [
    'user' =&gt; 1,
    '--queue' =&gt; 'default'
]);</code></pre>
<h2>推荐阅读</h2>
<ul>
<li><a href="https://phphub.org/topics/1759">Laravel 5.1 Artisan 命令行实战</a></li>
</ul>
		</div>

		<div class="main-footer" style="border-top:1px dashed rgba(0, 0, 0, 0.1);padding-top: 30px;margin-top:30px;margin-bottom: 20px;">
			<div class="prev-next-wrap clearfix">

									<a class="btn btn-primary pull-left btn-inverted" href="authorization.html"><i class="fa fa-arrow-left"></i> 用户授权</a>
				
			    &nbsp;
								    <a class="btn btn-primary pull-right btn-inverted" href="billing.html">交易 <i class="fa fa-arrow-right"></i></a>
							</div>
		</div>

	</article>
</div>

	<footer class="main">
		<ul>
			<li class="nav-docs"><a href="../5.4.html">文档</a></li>
<li ><a href="https://news.laravel-china.org/" class="no-pjax">Laravel 资讯</a></li>
<li class="dropdown"><a href="https://laravel-china.org/">Laravel China 社区</a></li>
<li class="nav-forge"><a href="https://laravel-china.org/categories/1">酷工作</a></li>
<li class="nav-docs"><a href="http://lumen.laravel-china.org">Lumen</a></li>
<li class="nav-forge"><a href="https://cs.laravel-china.org/">速查表</a></li>
<li class="nav-forge"><a href="https://laravel-china.org/laravel-tutorial/5.1/about">《Laravel 入门教程》</a></li>
		</ul>
		<p>Laravel is a trademark of Taylor Otwell. Copyright &copy; Taylor Otwell.</p>
		<p class="less-significant">
            <a href="http://jackmcdade.com">
                Designed by<br>
                <svg version="1.1"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
	 x="0px" y="0px" width="128.2px" height="28px" viewBox="0 0 128.2 28" enable-background="new 0 0 128.2 28" xml:space="preserve"
	>
<defs>
</defs>
<g>
	<path fill="#c3c3c3" d="M14.2,0.4c0,0.2,0,0.5,0,0.7c0,0.2,0,0.5,0,0.7l-1.4-0.3C12.9,3,13,4.5,13.1,6c0.1,1.5,0,3-0.1,4.5
		c0,0.4-0.1,0.8-0.1,1.2c-0.1,0.4-0.1,0.8-0.3,1.2c-0.1,0.4-0.3,0.7-0.5,1.1c-0.2,0.3-0.5,0.6-0.9,0.9c-0.4,0.2-0.9,0.4-1.5,0.6
		c-0.6,0.2-1.1,0.3-1.6,0.3c-0.6,0-1.2-0.1-1.6-0.3c-0.5-0.2-0.9-0.6-1.1-1c-0.3-0.5-0.5-1-0.6-1.6c-0.1-0.6-0.1-1.3,0-2.1
		c0-0.2,0.1-0.5,0.2-0.7C4.9,9.9,5,9.7,5.1,9.5c0.1-0.2,0.2-0.4,0.3-0.6l1.1,0.4C6.7,9.3,7,9.4,7.3,9.5c0.3,0.1,0.5,0.1,0.6,0.2
		c0,0.2,0,0.4-0.1,0.5c-0.1,0.2-0.1,0.3-0.2,0.4c-0.1,0.1-0.2,0.3-0.2,0.4c-0.1,0.2-0.1,0.3-0.1,0.5l-1.3-0.7
		c-0.1,0.3-0.2,0.7-0.2,1.1c0,0.4,0.1,0.8,0.2,1.2c0.2,0.4,0.4,0.7,0.6,1c0.3,0.3,0.6,0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.1c0.1-2.1,0.2-4.3,0.1-6.5C116.3,5.5,116.3,3.4,116.5,1.2z"/>
</g>
</svg>

            </a>
        </p>
	</footer>

	<script>
		var algolia_app_id      = 'FU55RWGNDN';
		var algolia_search_key  = 'c41c5de31ca55044dbb0bde815d35121';
				var version             = '5.1';
			</script>

	<script id="search_suggestion_template" type="text/template">
	<div class="autocomplete-wrapper">
		{{#_highlightResult.h1}}
		<div class="h1">
			{{{ _highlightResult.h1.value }}}
		</div>
		{{/_highlightResult.h1}}

		<div class="sub-section">
			{{#_highlightResult.h2}}
			<div class="h2">
				<span class="hash">#</span> {{{ _highlightResult.h2.value }}}
			</div>
			{{/_highlightResult.h2}}

			{{#_highlightResult.h3}}
			<div class="h3">
				> {{{ _highlightResult.h3.value }}}
			</div>
			{{/_highlightResult.h3}}

			{{#_highlightResult.h4}}
			<div class="h4">
				> {{{ _highlightResult.h4.value }}}
			</div>
			{{/_highlightResult.h4}}
		</div>

		{{#_highlightResult.content}}
		<div class="content">
			{{{ _highlightResult.content.value }}}
		</div>
		{{/_highlightResult.content}}
	</div>
</script>

<script id="search_empty_template" type="text/template">
	<div class="autocomplete-wrapper empty">
		<div class="h2">We didn't find any result for "{{query}}". Sorry!</div>
	</div>
</script>

<script id="search_footer_template" type="text/template">
	<div class="footer">
		<a target="_blank" href="https://www.algolia.com/referrals/5a08e6a4/join">
			<img width="50" src="/docs/assets/img/algolia-logo.png">
			<div class="powered">powered by</div>
			<div style="clear: both"></div>
		</a>
	</div>
</script>

	<script src="../../build/assets/js/laravel-db513c8174.js"></script>
	<script src="../../assets/js/viewport-units-buggyfill.js"></script>

	<script>window.viewportUnitsBuggyfill.init();</script>
    <script>
          ga('create', 'UA-53903425-7', 'auto');
          ga('send', 'pageview');
    </script>
</body>
</html>
